#!/usr/bin/env python

import sys

def create_class(name,source,header):
    src_string = open(source,'r').read()
    src_header = open(header,'r').read()

    name_dict = { 'Classname' : name , 
                  'ClassUpper': name.upper(),
                  'ClassLower': name.lower() }

    dest_src_string = src_string % name_dict
    dest_hdr_string = src_header % name_dict

    dest_source = open( name_dict['ClassLower'] + '.cpp','w')
    dest_source.write(dest_src_string)

    dest_header = open( name_dict['ClassLower'] + '.h','w')
    dest_header.write(dest_hdr_string)


if __name__ == '__main__':
    create_class(sys.argv[1],sys.argv[2],sys.argv[3])

